<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<!-- <script type="text/javascript" src="jquery-1.5.1.min.js"></script> -->
<script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
	$(function(){
		//中心点横坐标
		var dotLeft = ($(".container").width()-$(".dot").width())/2;
		//中心点纵坐标
		var dotTop = ($(".container").height()-$(".dot").height())/2;
		//起始角度
		var stard = 0;
		//半径
		var radius = 200;
		//每一个BOX对应的角度;
		var avd = 360/$(".box").length;
		//每一个BOX对应的弧度;
		var ahd = avd*Math.PI/180;
		//运动的速度
		var speed = 2;
		
		//运动函数
		
		

		//设置圆的中心点的位置
		$(".dot").css({"left":dotLeft,"top":dotTop});
		//设置DIV圆形排列
		$(".box").each(function(index, element){
            $(this).css({"left":Math.sin((ahd*index))*radius+dotLeft,"top":Math.cos((ahd*index))*radius+dotTop});
        });
		
		//运动函数
		var fun_animat = function(){
			
			speed = speed<360?speed:2;
			
			//运运的速度
			speed+=2;
			//运动距离，即运动的弧度数;
			var ainhd = speed*Math.PI/180;
			
			//按速度来定位DIV元素
			$(".box").each(function(index, element){
				$(this).css({"left":Math.sin((ahd*index+ainhd))*radius+dotLeft,"top":Math.cos((ahd*index+ainhd))*radius+dotTop});
     		});
		}
		
		
		//定时调用运动函数
		var setAnimate = setInterval(fun_animat,100);
	})
</script>
<style type="text/css">
*{margin:0;padding:0;}
.container{position:relative;width:700px;height:800px; margin:0 auto; border:1px solid #F00;}
.box{position:absolute;width:50px;height:50px;background:#000; color:#FFFFFF; font-size:16px;}
.dot{ position:absolute;width:20px;height:20px;background:#F00;}
</style>
</head>
<body>
<div class="container">
	<div class="box">a</div>
	<div class="box">b</div>
	<div class="box">c</div>
	<div class="box">d</div>
	<div class="box">e</div>
	<div class="box">f</div>
	<div class="box">g</div>
	<div class="box">h</div>
	<div class="box">i</div>
	<div class="box">j</div>
</div>
</body>
</html>
